package com.kstech.ks_gaz01.test


import android.util.Log

/**
 * author: blankii
 * created on: 2024/9/25 9:22
 * description:
 */
public class Test {
    private val arr = mutableListOf<TestObj?>()
    var obj: TestObj? = null
    fun test() {
        Log.e("blankii", "copy 开始")
        for (i in 0 until 30000) {
            if (obj == null) {
                obj = TestObj(i.toString(), "123", "12")
            } else {
                obj = obj!!.copy(i.toString(), "123", "12")
            }
            arr.add(obj)
        }
        Log.e("blankii", "copy 完成:${arr.size}")
    }

    data class TestObj(val id: String, val name: String, val age: String) {}
}